<?php

class DB_URL_PROVINCE extends ORM_Table {
    static protected $table_name = 'url_province';
    
    static public function getTableName($params = null) {
        //$table_name = self::$table_name.substr($params['article_type_id'], 0, 1);
        return self::$table_name;
    }
    static public function setUpdate($uhash) {
        $os     = getOsName();
        $has    = ORM_Finder::findOne(DB_URL_PROVINCE,"name='$os' and uhash='$uhash'");
        if($has) {
            $has->setClick($has->getClick()+1);
            $has->save();
        }else{
            $has    = new DB_URL_OS();
            $has->setUhash($uhash);
            $has->setName(getOsName());
            $has->save();
        }
    }
}

